/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package cn.webrx;

import java.time.Year;
import java.util.Calendar;

/**
 * <p>Project: jse2303 - If2
 * <p>Powered by webrx On 2023-07-11 11:40:54
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class If2 {
    public static void main(String[] args) {
        Calendar c = Calendar.getInstance();
        c.add(Calendar.MONTH, 4);
        int k = c.get(Calendar.DAY_OF_WEEK);//1日 2一 - 7
        //System.out.printf("%tF %<tT %<tA %d", c, k);
        if (k == 1) {
            System.out.println("星期日");
        } else if (k == 2) {
            System.out.println("星期一");
        } else if (k == 3) {
            System.out.println("星期二");
        } else if (k == 4) {
            System.out.println("星期三");
        } else if (k == 5) {
            System.out.println("星期四");
        } else if (k == 6) {
            System.out.println("星期五");
        } else {
            System.out.println("星期六");
        }
        //十一月
        System.out.printf("%tB%n", c);
        int m = c.get(Calendar.MONTH);
        if (m == 10) {
            System.out.println("十一月");
        }

        System.out.println(Year.of(2020).isLeap());
    }
}
